#include <iostream>
#include <cmath>
using namespace std;
int main(){
	long double a,q,b,r,k;
	
	cin>>a>>b;
	
	if(a<b){
		k=a;
		a=b;
		b=k;
	}
	r=int(a)%b;
	q=(a-r)/b;
	cout<<q<<" "<<r;
	
	
	
} 
